home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / AIncludes / PrPrivate.a < prev    next >
Encoding:
Text File  |  1993-12-02  |  9.7 KB  |  234 lines  |  [TEXT/MPS ]

  1. ;    File:        PrPrivate.a
  2. ;
  3. ;    Copyright:    © 1983-1993 by Apple Computer, Inc.
  4. ;                All rights reserved.
  5. ;
  6. ;    Version:    System 7.1 for ETO #11
  7. ;    Created:    Tuesday, March 30, 1993 18:00
  8. ;
  9. ;___________________________________________________________________________
  10.  
  11.     IF &TYPE('__INCLUDINGPRPRIVATE__') = 'UNDEFINED' THEN
  12. __INCLUDINGPRPRIVATE__    SET    1
  13.  
  14. ; Printing Code Constants
  15.  
  16. ; These are the PrDrvr constants.
  17.  
  18. lPrLFSixth        EQU         -1                        ; The PrDevCtl Proc's CParam for 1/6 th inch paper advance
  19. lPrLFEighth       EQU         -2                        ; The PrDevCtl Proc's CParam for 1/8 th inch paper advance
  20. iPrDocOpen        EQU         1                         ; The PrDevCtl Proc's CParam for doc begin
  21. iPrPageClose      EQU         2                         ; The PrDevCtl Proc's CParam for page end
  22. ;iPrLineFeed equ 3 ; The PrDevCtl Proc's CParam for paper advance
  23. iPrPageOpen       EQU         4                         ; The PrDevCtl Proc's CParam for page begin
  24. iPrDocClose       EQU         5                         ; The PrDevCtl Proc's CParam for doc end
  25. iPrLFStd          EQU         -1                        ; The PrDevCtl Proc's CParam for std paper advance
  26. iMscCtl           EQU         9                         ; Msc Text state / Drvr State ctl number
  27. iPvtCtl           EQU         10                        ; Private Ctls start here
  28.  
  29. ; State Constants
  30.  
  31. bPrDevOpen        EQU         1                         ; The DevOpen State Indicator
  32. bPrDocOpen        EQU         2                         ; The DocOpen State Indicator
  33. bPrPageOpen       EQU         3                         ; The PageOpen State Indicator
  34. bPrPrinting       EQU         4                         ; The Printing State Indicator
  35. bPrPageClose      EQU         5                         ; The PageClose State Indicator
  36. bPrDocClose       EQU         6                         ; The DocClose State Indicator
  37. bPrDevClose       EQU         0                         ; The DevClose State Indicator
  38.  
  39. ; These are misc Alert & Dialog constants
  40.  
  41. iOK               EQU         1                         ; OK Button
  42. iCancel           EQU         2                         ; Cancel Button
  43. iPrStlDlg         EQU         $E000                     ; {-8192} Style Dialog
  44. iPrJobDlg         EQU         $E001                     ; {-8191} Job Dialog
  45. iPrCfgDlg         EQU         $E002                     ; {-8190} Configuration Dialog
  46. iPgFeedAx         EQU         $E00A                     ; {-8182} Page Feed Dialog
  47. iPicSizAx         EQU         $E00B                     ; {-8181} Pic Size Alert
  48. iIOAbrtAx         EQU         $E00C                     ; {-8180} IO Timeout Alert
  49. iPrPgFst          EQU         1
  50. iPrPgMax          EQU         9999
  51. iPrSavPFil        EQU         $FFFF                     ; Abort but save print file
  52.  
  53. ; Printing data structures
  54.  
  55. ; Print Info data structure
  56. ; The parameters needed for page composition.
  57.  
  58.  
  59. ;iDev already defined in PrEqu.a
  60. ;iDev EQU 0 ; Font mgr/QuickDraw device code [word]
  61.  
  62. iVRes             EQU         2                         ; V Resolution of device, in device coord.[word]
  63. iHRes             EQU         4                         ; H resolution [word]
  64. iPrInfoSize       EQU         14                        ; The PrInfo size.[14]
  65.  
  66.  
  67. ; Printer Style data structure
  68. ; The printer configuration and usage information.
  69.  
  70. ;wDev EQU 0 ; The drvr #, Hi byte=RefNum, Lo byte=variant [word]
  71. bPort             EQU         6                         ; The IO port number [byte]
  72. iPrStlSize        EQU         8                         ; The PrStl size.[8]
  73.  
  74.  
  75. ; Print eXtra Info data structure
  76. ; The print time eXtra information.
  77.  
  78. iRowBytes         EQU         0                         ; The Band's rowBytes. [word]
  79. iBandV            EQU         2                         ; V Size of band, in device coordinates [word]
  80. iBandH            EQU         4                         ; H size of band [word]
  81. iBands            EQU         8                         ; Number of bands per page.
  82. bPatScale         EQU         10                        ; Pattern scaling [byte]
  83. bULThick          EQU         11                        ; 3 Underscoring parameters [byte]
  84. bULOffset         EQU         12                        ; [byte]
  85. bULShadow         EQU         13                        ; [byte]
  86. scan              EQU         14                        ; Band scan direction [byte]
  87. bXInfoX           EQU         15                        ; An eXtra byte. [byte]
  88. iPrXInfoSize      EQU         16                        ; The PrXInfo size.[16 bytes]
  89.  
  90.  
  91. ; Print Job data structure
  92. ; Print "form" for a single print request.
  93.  
  94. ;iFstPage EQU 0 ; Page Range [word]
  95. ;iLstPage EQU 2 ; [word]
  96. ;iCopies EQU 4 ; # copies [word]
  97. ;bJDocLoop EQU 6 ; Draft quality print flag [byte]
  98. ;fFromApp EQU 7 ; Printing from an App (not PrApp) flag [byte]
  99. ;pIdleProc EQU 8 ; Idle Proc [pointer]
  100. ;pFileName EQU 12 ; Spool File Name: NIL for default [pointer]
  101. ;iFileVol EQU 16 ; Spool File vol [word]
  102. ;bFileVers EQU 18 ; Spool File version [byte]
  103. bJobX             EQU         19                        ; An eXtra byte [byte]
  104. ;iPrJobSize EQU 20 ; The PrJob size.[20]
  105.  
  106.  
  107. ; Print Port structure
  108. ; A graf port, its procs, plus some extra.
  109.  
  110. ;gPort EQU 0 ; The Printer's graf port
  111. gProcs            EQU         108                       ; ..and its procs [13 pointers]
  112. lGParam1          EQU         160                       ; Some params: Our relocatable stuff etc [long]
  113. lGParam2          EQU         164                       ; [long]
  114. lGParam3          EQU         168                       ; [long]
  115. lGParam4          EQU         172                       ; [long]
  116. fOurPtr           EQU         176                       ; PrPort allocation done by us? [byte]
  117. fOurBits          EQU         177                       ; BitMap allocation done by us? [byte]
  118. ;iPrPortSize EQU 178 ; The PrPort size.[178]
  119.  
  120.  
  121. ; Print Status data structure
  122.  
  123. ;iTotPages EQU 0 ; Total pages in Print File [word]
  124. ;iCurPage EQU 2 ; Current page number [word]
  125. ;iTotCopies EQU 4 ; Total copies requested [word]
  126. ;iCurCopy EQU 6 ; Current copy number [word]
  127. ;iTotBands EQU 8 ; Total bands per page [word]
  128. ;iCurBand EQU 10 ; Current band number [word]
  129. ;fPgDirty EQU 12 ; current page has been written to? [byte]
  130. ;fImaging EQU 13 ; in band's DrawPic call? [byte]
  131. ;hPrint EQU 14 ; active Printer record [handle]
  132. ;pPrPort EQU 18 ; active PrPort [pointer]
  133. hPic              EQU         22                        ; active Picture [handle]
  134. ;iPrStatSize EQU 26 ; The PrStatus size[26 bytes]
  135.  
  136.  
  137. ; Print dialog
  138.  
  139. dlg               EQU         0                         ; DialogWindow
  140. pFltrProc         EQU         170                       ; filter Proc [pointer]
  141. pItemProc         EQU         174                       ; item evaluating proc [pointer]
  142. hPrintUsr         EQU         178                       ; user's print record [handle]
  143. fDoIt             EQU         182                       ; Boolean
  144. fDone             EQU         183                       ; Boolean
  145. lPrDlg1           EQU         184                       ; users to hang global data [long]
  146. lPrDlg2           EQU         188                       ; [long]
  147. lPrDlg3           EQU         192                       ; [long]
  148. lPrDlg4           EQU         196                       ; [long]
  149. iPrDlgSz          EQU         200
  150.  
  151.  
  152.  
  153. ; Less common print code stuff
  154.  
  155. ; These are the definitions for the Print code
  156.  
  157. fPrDbgOK          EQU         1                         ; Debug enable
  158. iPrSystemError    EQU         29                        ; Printcode System Error
  159.  
  160. ; The Private Print Globals; 16 bytes located at [SysEqu] PrintVars
  161.  
  162. PrintVars         EQU         $944                      ; print code variables [16 bytes]
  163. PrintErr          EQU         $944                      ; Current Printer Error
  164. ;ChooserBits EQU $946 ; bit 7 = 0 don't run; bit 6 = 0 gray out AppleTalk
  165. iPrErr            EQU         0                         ; Offset to current print error. Set to iPrAbort to abort printing.
  166. bDocLoop          EQU         2                         ; The Doc style: Draft, Spool, .., and ..
  167. ; Currently use low 2 bits; the upper 6 are for flags.
  168. bUser1            EQU         3
  169. lUser1            EQU         4
  170. lUser2            EQU         8
  171. lUser3            EQU         12
  172. iPrResFileRefNum  EQU         14                        ; The current print driver's resource file refnum 
  173. iPrVarSize        EQU         16                        ; The PrVar's size.[16]
  174. iPrError          EQU         PrintVars+iPrErr          ; abs loc of PrintError
  175. bPrFlags          EQU         PrintVars+bDocLoop        ; abs loc of pr flags
  176. bPrType           EQU         PrintVars+bUser1          ; abs loc of pr type field = -bDev [default = imagewriter = FF]
  177. fNewRunBit        EQU         2                         ; Bit 2 (3rd bit) in bDocLoop: new JobRun indicator
  178. fHiResOK          EQU         3                         ; Bit 3 (4th bit) is hi res indicator for paint
  179. fWeOpenedRF       EQU         4                         ; Bit 4 (5th bit) is set if driver opend the prres file.
  180. iPrRefNum         EQU         PrintVars+iPrResFileRefNum
  181.                                                         ; abs loc of the current print driver's resource file refnum
  182.  
  183. ; Printer Type Constants (each new printer has its own index value)
  184.  
  185. bDevCItoh         EQU         1                         ; Imagewriter
  186. bDevDaisy         EQU         2                         ; Daisy wheel printer (scrapped)
  187. bDevLaser         EQU         3                         ; LaserWriter
  188.  
  189. ; Miscellaneous constants.
  190.  
  191. scanTB            EQU         0                         ; scan top-bottom
  192. scanBT            EQU         1                         ; scan bottom-top
  193. scanLR            EQU         2                         ; scan left-right
  194. scanRL            EQU         3                         ; scan right-left
  195.  
  196. ;-------------------------------------------------------------------------------
  197. ; These are the constants for using resources to swap in the non-driver
  198. ; print code. Three numbers are needed:
  199. ; ResType
  200. ; ResID
  201. ; Offset into the seg's jump table
  202. ;
  203. ; The offset is really a formatted Long that contains three fields:
  204. ; Frame Size; Unlock flag; Offset into the seg's jump table
  205. ; We could use the topmost byte for further stuff: a stack adjust for
  206. ; storing the registers needed by the link code so that it would be re-entrant.
  207. ;-------------------------------------------------------------------------------
  208.  
  209. lPDefType         EQU         $50444546                 ; Pr Resource TYPE: "PDEF"
  210. iPrDraftID        EQU         0                         ; Pr Draft Resource ID
  211. iPrSpoolID        EQU         1                         ; Pr Spool Resource ID
  212. iPrUser1ID        EQU         2                         ; Pr Spare1 Resource ID
  213. iPrUser2ID        EQU         3                         ; Pr Spare2 Resource ID
  214. lOpenDoc          EQU         $000C0000                 ; PrOpenDoc JumpTable offset
  215. lCloseDoc         EQU         $00048004                 ; PrCloseDoc JumpTable offset
  216. lOpenPage         EQU         $00080008                 ; PrOpenPage JumpTable offset
  217. lClosePage        EQU         $0004000C                 ; PrClosePage JumpTable offset
  218. iPrDlgsID         EQU         4                         ; Pr Dialogs Resource ID
  219. lDefault          EQU         $00048000                 ; PrintDefault JumpTable offset
  220. lStlDialog        EQU         $00048004                 ; PrStlDialog JumpTable offset
  221. lJobDialog        EQU         $00048008                 ; PrJobDialog JumpTable offset
  222. lStlInit          EQU         $0004000C                 ; PrStlInit JumpTable offset
  223. lJobInit          EQU         $00040010                 ; PrJobInit JumpTable offset
  224. lDlgMain          EQU         $00088014                 ; PrDlgMain JumpTable offset
  225. lPrValidate       EQU         $00048018                 ; PrintValidate JumpTable offset
  226. lPrJobMerge       EQU         $0008801C                 ; PrintValidate JumpTable offset
  227. iPrPicID          EQU         5                         ; Pic Printing Resource ID
  228. lPrPicFile        EQU         $00148000                 ; PrPicFile JumpTable offset
  229. iCfgDlgID         EQU         6                         ; Configuration proc Resource ID
  230. lCfgDialog        EQU         $00008000                 ; PrCfgDialog JumpTable offset
  231. iPrHackID         EQU         7                         ; The "Oops, I Forgot" Resource ID
  232. lPrHack           EQU         $000C8000                 ; PrHack JumpTable offset
  233.  
  234.     ENDIF    ; ...already included